from flask_sqlalchemy import SQLAlchemy

db = SQLAlchemy()


class Shulj(db.Model):
    __tablename__ = 'shulj'
    __table_args__ = {'extend_existing': True}
    id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    name = db.Column(db.String(32), unique=True)
    age = db.Column(db.String(64), nullable=True)
    sex = db.Column(db.String(64), nullable=True)
    school = db.Column(db.String(64), nullable=True, default='浙江大学')

    # def __repr__(self):
    #     return '<User %r>' % self.username


if __name__ == '__main__':
    db.create_all()
